package hcn.protocol.ods.electronicInvoice.req;


import hcn.response.bean.PatientMedicalCardInformation;

import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.XmlRootElement;
import java.util.List;

@XmlRootElement(name = "MsgBody")
public class QueryInvoiceListXmlRequest {

    private String requestKey;

    //医院代码，为空时查询所有机构发票列表
    private String organizationId;
    //结算标识
    private String paymentNumber;
    //发票号码
    private String invoiceCode;
    //患者标识集合，包括患者编号
    private List<InnerSourcePatientIdList> sourcePatientIdLists;
    //查询类型，参数设置，1表示按患者患者标识集合查询；2表示按证件集合查询；3表示按诊疗卡集合查询；默认是1
    private int queryType;
    //诊疗卡集合，包含：诊疗卡类型和诊疗卡号码
    private List<PatientMedicalCardInformation> patientMedicalCardList;
    //证件集合，包含：证件类型和证件号码
    private List<PatientIdentityCardList> patientIdentityCardList;
    private Integer pageNo = 1;
    private Integer pageSize = 20;

    public String getRequestKey() {
        return requestKey;
    }

    public void setRequestKey(String requestKey) {
        this.requestKey = requestKey;
    }

    @XmlElement(name = "VisitOrganization")
    public String getOrganizationId() {
        return organizationId;
    }

    public void setOrganizationId(String organizationId) {
        this.organizationId = organizationId;
    }

    @XmlElement(name = "PaymentNumber")
    public String getPaymentNumber() {
        return paymentNumber;
    }

    public void setPaymentNumber(String paymentNumber) {
        this.paymentNumber = paymentNumber;
    }

    @XmlElement(name = "InvoiceCode")
    public String getInvoiceCode() {
        return invoiceCode;
    }

    public void setInvoiceCode(String invoiceCode) {
        this.invoiceCode = invoiceCode;
    }

    @XmlElementWrapper(name = "SourcePatientIdLists")
    @XmlElement(name = "SourcePatientIdList")
    public List<InnerSourcePatientIdList> getSourcePatientIdLists() {
        return sourcePatientIdLists;
    }

    public void setSourcePatientIdLists(List<InnerSourcePatientIdList> sourcePatientIdLists) {
        this.sourcePatientIdLists = sourcePatientIdLists;
    }

    @XmlElement(name = "QueryType")
    public int getQueryType() {
        return queryType;
    }

    public void setQueryType(int queryType) {
        this.queryType = queryType;
    }

    @XmlElementWrapper(name = "MedicalCardIdLists")
    @XmlElement(name = "MedicalCardIdList")
    public List<PatientMedicalCardInformation> getPatientMedicalCardList() {
        return patientMedicalCardList;
    }

    public void setPatientMedicalCardList(List<PatientMedicalCardInformation> patientMedicalCardList) {
        this.patientMedicalCardList = patientMedicalCardList;
    }

    @XmlElementWrapper(name = "IdCardLists")
    @XmlElement(name = "IdCardList")
    public List<PatientIdentityCardList> getPatientIdentityCardList() {
        return patientIdentityCardList;
    }

    public void setPatientIdentityCardList(List<PatientIdentityCardList> patientIdentityCardList) {
        this.patientIdentityCardList = patientIdentityCardList;
    }

    @XmlElement(name = "PageNo")
    public Integer getPageNo() {
        return pageNo;
    }

    public void setPageNo(Integer pageNo) {
        this.pageNo = pageNo;
    }

    @XmlElement(name = "PageSize")
    public Integer getPageSize() {
        return pageSize;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }

    public static class PatientIdentityCardList {
        private String cardNumber;
        private String cardType;

        @XmlElement(name = "IdCard")
        public String getCardNumber() {
            return cardNumber;
        }

        public void setCardNumber(String cardNumber) {
            this.cardNumber = cardNumber;
        }

        @XmlElement(name = "IdCardCode")
        public String getCardType() {
            return cardType;
        }

        public void setCardType(String cardType) {
            this.cardType = cardType;
        }
    }

    public static class InnerSourcePatientIdList {
        private String SourcePatientId;

        @XmlElement(name = "SourcePatientId")
        public String getSourcePatientId() {
            return SourcePatientId;
        }

        public void setSourcePatientId(String sourcePatientId) {
            SourcePatientId = sourcePatientId;
        }
    }
}